/*
 * OrderBankInfoHolder.java
 * business
 *
 * Created by SunDing on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.viewholder;

import android.view.Gravity;
import android.view.View;
import android.widget.TextView;

import com.yidiandao.business.R;
import com.yidiandao.business.data.response.QueryOrderResultResponse;
import com.yidiandao.business.ui.widget.listview.ViewHolder;

/** 银行转行信息 Holder */
public class OrderInformationBankInfoHolder extends ViewHolder {

    private TextView mTvName;

    private TextView mTvDetail;

    @Override
    protected void initView(View rootView) {
        mTvName = (TextView) rootView.findViewById(R.id.tv_name);
        mTvDetail = (TextView) rootView.findViewById(R.id.tv_detail);
    }

    @Override
    protected int getItemLayoutId() {
        return R.layout.item_order_information_bank_info;
    }

    public void refreshUI(QueryOrderResultResponse.Data.PayDesc data) {
        mTvName.setText(data.getName());
        mTvDetail.setText(data.getDesc());
        if (data.isAlignLeft()) {
            mTvDetail.setGravity(Gravity.LEFT);
        }
    }
}
